<#include "../head_top.ftl">
        <title>
            Fromat SQL Online
        </title>
        <meta name="description" content="Tool for format SQL, which make the SQL more readable">
        <meta name="keywords" content="Format SQL, SQL Format">
<#include "../head_down.ftl">
    
    <body>
		<#include "/template/common/navigator.ftl">
        <div class="container">
            <div class="row">
                <div class="span10">
                    <div id="listing-post-container">
						<h1>SQL Formater</h1>
						<p></p>
						<p></p>
						<p></p>		
						<p>This tool is used to format SQL, which make the SQL more readable.</p>						
						<form method="post" action="format_sql" id="form1">
							<table>
								<tr>
									<td>	
										SQL Type:
										<select name="requestType" id="requestType">
											<option value="mysql"<#if "${requestType!''}"=="mysql"> selected</#if>>Mysql</option>
											<option value="oracle"<#if "${requestType!''}"=="oracle"> selected</#if>>Oracle</option>
											<option value="sqlserver"<#if "${requestType!''}"=="sqlserver"> selected</#if>>SQLServer</option>
											<option value="postgre"<#if "${requestType!''}"=="postgre"> selected</#if>>Postgre</option>
											<option value="odps"<#if "${requestType!''}"=="odps"> selected</#if>>ODPS</option>
										</select>
									</td>
								</tr>								
								<tr id="postTr">
									<td>
										SQL Scripts:
										<textarea cols="105" rows="15" name="content" id="content">${content!''}</textarea>
									</td>
								</tr>
								<tr>
									<td align="center">
										<input type="button" value="Format" onclick="doSubmit()"/>
									</td>
								</tr>
							</table>
						</form>
						Result:
						<textarea cols="105" rows="15" name="contentResult" readonly="readonly">${contentResult!''}</textarea>
                    </div>
                </div>
                <!--/span10 -->
                <#include "/template/tool/tool_right.ftl">
                <!--/.span4 -->
            </div>
            <!-- /.row -->
        </div>
        <!-- /container -->
		<#include "/template/common/tail.ftl">
    </body>
    <!-- end of body -->
	<script>
		function doSubmit(action){
			if(document.getElementById("content").value.trim()==""){
				alert("SQL is not input.");
			}else{
				document.getElementById("form1").submit();
			}
		}
	</script>
</html>